<extend name="base/Base" />
<block name="Style">
<!-- FooTable Plugin CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/vendor/plugins/footable/css/footable.core.min.css">
		<!-- Admin Forms CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/assets/admin-tools/admin-forms/css/admin-forms.css">
		
		
		
</block>
<block name="Topbar">
								
 <!-- Start: Topbar -->
      <header id="topbar" class="ph10">
        <div class="topbar-left">
          <ul class="nav nav-list nav-list-topbar pull-left">
          
           
			<li >
              <a   href="__APP__/Admin/My/Info.html">修改信息</a>
            </li>
            <li class="active">
              <a  href="__APP__/Admin/My/Password.html"  >修改密码</a>
            </li>
          </ul>
        </div>
       <!--  <div class="topbar-right hidden-xs hidden-sm">
			<form class="form-inline" action="__APP__/XYZR/Database/MySQL/Backup.html" method="post">
			  <div class="form-group">
				<label for="exampleInputName2">开始时间</label>
				<input type="date" class="form-control" placeholder="请输入开始时间" name="begin_time" value='{$time|time|date="Y-m-d",###}'>
			  </div>
			  <div class="form-group">
				<label for="exampleInputEmail2">结束时间</label>
				<input type="date" class="form-control"  placeholder="请输入开始时间"  name="end_time" value='{$time|time|date="Y-m-d",###}' >
			  </div>
			  <button type="submit" class="btn btn-success">搜索记录</button>
			</form>
        </div>  -->
      </header>
	  						
    				
</block>
<block name="Content">

<!-- START ROW -->

	<div class="row">

		<!-- NEW COL START -->
		<article class="col-md-offset-1 col-sm-12 col-md-12 col-lg-10">
			
			<!-- Widget ID (each widget will need unique ID)-->
			<div class="jarviswidget" id="wid-id-7" data-widget-editbutton="false" data-widget-custombutton="false">
				<!-- widget options:
					usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
					
					data-widget-colorbutton="false"	
					data-widget-editbutton="false"
					data-widget-togglebutton="false"
					data-widget-deletebutton="false"
					data-widget-fullscreenbutton="false"
					data-widget-custombutton="false"
					data-widget-collapsed="true" 
					data-widget-sortable="false"
				-->
				

				<!-- widget div-->
				<div>
					
					<!-- widget edit box -->
					<div class="jarviswidget-editbox">
						<!-- This area used as dropdown edit box -->
						
					</div>
					<!-- end widget edit box -->
					
					<!-- widget content -->
					<div class="widget-body no-padding">
						
						<form id="smart-form-register" action="__APP__/PTCRM/User/Conf/Password.html"  enctype="multipart/form-data" method="post" class="smart-form">
							

							 <div class="form-group">
								<label for="exampleInputEmail1">请输入原密码</label>
								<input type="password" name="oldpassword" id="oldpassword" class="form-control"  placeholder="请输入原密码" >
							  </div>
							  
							  <div class="form-group">
								<label for="exampleInputEmail1">请输入新密码</label>
								<input  type="password" name="password" id="password" class="form-control"  placeholder="请输入新密码" >
							  </div>
							  
							   <div class="form-group">
								<label for="exampleInputEmail1">请再次输入新密码</label>
								<input  type="password" name="unpassword" id="unpassword" class="form-control"  placeholder="请再次输入新密码" >
							  </div>
							 
							
									
								
							</fieldset>
							<br>
							<footer>
							
								<a onclick="change()" class="btn btn-primary" style="width:100%">
									修改密码
								</a>
							</footer>
						</form>						
						
					</div>
					<!-- end widget content -->
					
				</div>
				<!-- end widget div -->
				
			</div>
			<!-- end widget -->	

		</article>
		<!-- END COL -->

		
	<br>
	<br>
	</div>

	<!-- END ROW -->
	
</block>
<block name="Script">
	
  <!-- FooTable Plugin -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.all.min.js"></script>
   <!-- FooTable Addon -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.filter.min.js"></script>
<script>
						
							//新增配置
							//新增配置
							function change(){  
							
								var oldpassword = $("#oldpassword").val();
								var unpassword = $("#unpassword").val();
								
								var password = $("#password").val();
								
							
								if(unpassword!=password){
								
									layer.msg('两次密码不一致');
									
								}else{
								
									$.ajax({
										type:'POST',
										url:"__APP__/CMS/My/Password.html",
										data:{
											
											"oldpassword": oldpassword,
											"password": password,
											
											
											
										},
										success:function(data){			
											var info = eval(data)
											if (info.errcode == 0) {
											
												layer.msg(info.errmsg);
												setTimeout(window.location.reload(),3000);
												
											}else{
												layer.msg(info.errmsg);
											}
										},
										error:function(){
											layer.msg('系统繁忙,请稍候重试！');
										}
								
									});	
								
								}
								
								 
							}  
							</script>
 <script type="text/javascript">
  jQuery(document).ready(function() {

 

    // Init FooTable Examples
    $('.footable').footable();


  });
  </script>
</block>